<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://cdn.suoluomei.com/common/js2.0/axios/axios.min.js"></script>
    <script>
        //get请求
        axios.get('http://www.baidu.com', {
            params: {

            }
        })
            .then(function (res) {
                //成功的回调
                console.log("========")
                console.log(res)
            })
            .catch(function (error) {
                //失败的回调
            });

        //post请求
        axios.post('http://php.com', {
            aa: '11',
            bb: '22'
        })
            .then(function (res) {
                console.log(res);
            })
            .catch(function (error) {
                console.log(error);
            });


    </script>
</head>
<body>

</body>
</html>
